package cn.ithers.blog.response;

/**
 * @Author: zhanghuan
 * @date: 2020/8/27 20:01
 * @description:
 */
public enum ResponseState {

    SUCCESS(true, 20000, "操作成功啦"),
    LOGIN_SUCCESS(true, 20001, "登录成功喽"),
    JOIN_SUCCESS(true, 20002, "注册成功啦"),
    FAILED(false, 40000, "操作失败啦"),
    ACCOUNT_NOT_LOGIN(false, 40002, "账号未登录哦"),
    PERMISSION_DENIED(false, 40003, "您没有访问权限哦"),
    ACCOUNT_DENIED(false, 400004, "账号已被禁用啦"),
    ERROR_404(false, 404, "页面丢失啦，快去找回来"),
    ERROR_405(false, 405, "请求输入错误啦"),
    ERROR_403(false, 403, "您不是管理员哦,请通知管理员"),
    ERROR_500(false, 500, "服务的错误，请先检查参数是否填写完整"),
    ERROR_504(false, 504, "系统繁忙，请稍好重试"),
    ERROR_505(false, 505, "请求错误，请检查提交数据"),
    WAiTING_FOR_SCAN(false, 505, "请求错误，请检查提交数据");

    private int status;
    private String message;
    private boolean success;

    ResponseState(boolean success, int code, String message) {

        this.success = success;
        this.status = code;
        this.message = message;
    }


    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public boolean isSuccess() {
        return success;
    }

    public void setSuccess(boolean success) {
        this.success = success;
    }

}
